﻿@* 应用层Web Api测试项目文件 *@
@using Util.Generators.Helpers
@using Version = Util.Generators.Helpers.Version
@model Util.Generators.Contexts.EntityContext
@{
    var service = new GenerateService( Model );
    var testProject = service.GetWebApiTestProjectName();
    var webApiProject = service.GetWebApiProjectName();
    Model.Output.FileNameNoExtension = testProject;
    Model.Output.Extension = ".csproj";
    Model.Output.RelativeRootPath = $"test/{testProject}";
}
<Project Sdk="Microsoft.NET.Sdk.Web">
    <PropertyGroup>
        <TargetFramework>$(NetTargetFramework)</TargetFramework>
        <RootNamespace>@service.GetWebApiTestNamespace()</RootNamespace>
        <XunitStartupFullName>@(service.GetWebApiTestNamespace()).Startup</XunitStartupFullName>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="Util.Microservices" Version="@Version.Util" />
        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="@Version.TestSdk" />
        <PackageReference Include="Microsoft.Extensions.Hosting" Version="@Version.Hosting" />
        <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="@Version.TestHost" />
        <PackageReference Include="Xunit.DependencyInjection" Version="@Version.XunitDependencyInjection" />
        <PackageReference Include="Xunit.DependencyInjection.Logging" Version="@Version.XunitLogging" />
        <PackageReference Include="AutoBogus" Version="@Version.AutoBogus" />
        <PackageReference Include="xunit" Version="@Version.Xunit" />
        <PackageReference Include="xunit.runner.visualstudio" Version="@Version.XunitRunner">
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
            <PrivateAssets>all</PrivateAssets>
        </PackageReference>
        <PackageReference Include="coverlet.collector" Version="@Version.Coverlet">
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
            <PrivateAssets>all</PrivateAssets>
        </PackageReference>
    </ItemGroup>
    <ItemGroup>
        <ProjectReference Include="..\..\src\@webApiProject\@(webApiProject).csproj" />
    </ItemGroup>
</Project>